/*
 * CodePress regular expressions for RUBY syntax highlighting
 */

syntax = [ // RUBY
	/(&lt;[^!\?]*?&gt;)/g,'<b>$1</b>', // all tags
	/(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g,'<em>$1</em><em>$2</em><em>$3</em>', // style tags
	/(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g,'<ins>$1</ins><ins>$2</ins><ins>$3</ins>', // script tags
	/\"(.*?)(\"|<br>|<\/P>)/g,'<s>"$1$2</s>', // strings double quote
	/\'(.*?)(\'|<br>|<\/P>)/g,'<s>\'$1$2</s>', // strings single quote
	/(&lt;\?)/g,'<strong>$1', // <?.*
	/(\?&gt;)/g,'$1</strong>', // .*?>
	/(&lt;\?php|&lt;\?=|&lt;\?|\?&gt;)/g,'<cite>$1</cite>', // RUBY tags
	/(\$[\w\.]*)/g,'<a>$1</a>', // vars
	/\b(alias|and|begin|break|case|class|def|defined|do|else|elsif|end|ensure|for|if|in|module|while|next|not|or|redo|rescue|yield|retry|super|then|undef|unless|until|when|BEGIN|END|include|__FILE__|__LINE__|false|nil|self|true|return|Array|Float|Integer|String|at_exit|autoload|binding|caller|catch|chop|chop!|chomp|chomp!|eval|exec|exit|exit!|fail|fork|format|gets|global_variables|gsub|gsub!|iterator?|lambda|load|local_variables|loop|open|p|print|printf|proc|putc|puts|raise|rand|readline|readlines|require|select|sleep|split|sprintf|srand|sub|sub!|syscall|system|test|trace_var|trap|untrace_var)\b/g,'<u>$1</u>', // reserved words
	/([^:])\/\/(.*?)(<br|<\/P)/g,'$1<i>//$2</i>$3', // RUBY comments //
	/\/\*(.*?)\*\//g,'<i>/*$1*/</i>', // RUBY comments /* */
	/(&lt;!--.*?--&gt.)/g,'<big>$1</big>' // html comments
];

CodePress.initialize();

